function formSub(){

	if(document.getElementById('user_name').value==''){
			alert('请输入用户名！');
			document.getElementById('user_name').focus();
			return false;
		}
		if(document.getElementById('passwd').value==''){
			alert('请输入密码！');
			document.getElementById('passwd').focus();
			return false;
		}
		document.loginForm.submit();
}

 document.onkeydown = keyDown;
		
	function keyDown(e){ 
		if((e ? e.which : event.keyCode)==13 ){
				formSub();
		}
	}

	function GetFocus(){
		document.getElementById('user_name').focus();
	}